.class public Lcom/instagram/android/directshare/i/b;
.super Lcom/instagram/e/b/b;
.source "RequestedDirectSharesFragment.java"

# interfaces
.implements Lcom/instagram/a/b;
.implements Lcom/instagram/android/directshare/i/o;


# static fields
.field private static final a:Ljava/lang/Class;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/lang/Class",
            "<*>;"
        }
    .end annotation
.end field


# instance fields
.field private b:Lcom/instagram/android/directshare/i/a;

.field private c:Landroid/os/Handler;

.field private d:Landroid/widget/TextView;

.field private e:Landroid/content/IntentFilter;

.field private f:Landroid/content/BroadcastReceiver;


# direct methods
.method static constructor <clinit>()V
    .locals 1

    .prologue
    .line 46
    const-class v0, Lcom/instagram/android/directshare/i/b;

    sput-object v0, Lcom/instagram/android/directshare/i/b;->a:Ljava/lang/Class;

    return-void
.end method

.method public constructor <init>()V
    .locals 0

    .prologue
    .line 42
    invoke-direct {p0}, Lcom/instagram/e/b/b;-><init>()V

    .line 206
    return-void
.end method

.method private X()V
    .locals 4

    .prologue
    .line 135
    iget-object v0, p0, Lcom/instagram/android/directshare/i/b;->b:Lcom/instagram/android/directshare/i/a;

    invoke-virtual {v0}, Lcom/instagram/android/directshare/i/a;->a()I

    move-result v0

    if-nez v0, :cond_0

    .line 136
    iget-object v0, p0, Lcom/instagram/android/directshare/i/b;->c:Landroid/os/Handler;

    new-instance v1, Lcom/instagram/android/directshare/i/d;

    invoke-direct {v1, p0}, Lcom/instagram/android/directshare/i/d;-><init>(Lcom/instagram/android/directshare/i/b;)V

    const-wide/16 v2, 0x1f4

    invoke-virtual {v0, v1, v2, v3}, Landroid/os/Handler;->postDelayed(Ljava/lang/Runnable;J)Z

    .line 143
    :cond_0
    return-void
.end method

.method private Y()V
    .locals 2

    .prologue
    .line 146
    iget-object v0, p0, Lcom/instagram/android/directshare/i/b;->b:Lcom/instagram/android/directshare/i/a;

    invoke-static {}, Lcom/instagram/android/directshare/d/w;->a()Ljava/util/List;

    move-result-object v1

    invoke-virtual {v0, v1}, Lcom/instagram/android/directshare/i/a;->a(Ljava/util/List;)V

    .line 147
    invoke-direct {p0}, Lcom/instagram/android/directshare/i/b;->aa()V

    .line 148
    return-void
.end method

.method private Z()V
    .locals 3

    .prologue
    .line 287
    new-instance v0, Lcom/instagram/ui/a/a;

    invoke-virtual {p0}, Lcom/instagram/android/directshare/i/b;->getContext()Landroid/content/Context;

    move-result-object v1

    invoke-direct {v0, v1}, Lcom/instagram/ui/a/a;-><init>(Landroid/content/Context;)V

    sget v1, Lcom/facebook/ba;->directshare_requested_direct_shares_confirm_ignore_all_msg:I

    invoke-virtual {v0, v1}, Lcom/instagram/ui/a/a;->b(I)Lcom/instagram/ui/a/a;

    move-result-object v0

    sget v1, Lcom/facebook/ba;->directshare_requested_direct_shares_confirm_ignore_all_positive:I

    new-instance v2, Lcom/instagram/android/directshare/i/f;

    invoke-direct {v2, p0}, Lcom/instagram/android/directshare/i/f;-><init>(Lcom/instagram/android/directshare/i/b;)V

    invoke-virtual {v0, v1, v2}, Lcom/instagram/ui/a/a;->a(ILandroid/content/DialogInterface$OnClickListener;)Lcom/instagram/ui/a/a;

    move-result-object v0

    const/4 v1, 0x1

    invoke-virtual {v0, v1}, Lcom/instagram/ui/a/a;->a(Z)Lcom/instagram/ui/a/a;

    move-result-object v0

    sget v1, Lcom/facebook/ba;->cancel:I

    const/4 v2, 0x0

    invoke-virtual {v0, v1, v2}, Lcom/instagram/ui/a/a;->b(ILandroid/content/DialogInterface$OnClickListener;)Lcom/instagram/ui/a/a;

    move-result-object v0

    invoke-virtual {v0}, Lcom/instagram/ui/a/a;->b()Landroid/app/Dialog;

    move-result-object v0

    invoke-virtual {v0}, Landroid/app/Dialog;->show()V

    .line 303
    return-void
.end method

.method private a(Lcom/instagram/android/directshare/e/a;)V
    .locals 6
    .parameter

    .prologue
    const/4 v5, 0x0

    const/4 v4, 0x1

    .line 260
    new-instance v0, Lcom/instagram/ui/a/a;

    invoke-virtual {p0}, Lcom/instagram/android/directshare/i/b;->getContext()Landroid/content/Context;

    move-result-object v1

    invoke-direct {v0, v1}, Lcom/instagram/ui/a/a;-><init>(Landroid/content/Context;)V

    sget v1, Lcom/facebook/ba;->directshare_requested_direct_shares_confirm_ignore_title:I

    new-array v2, v4, [Ljava/lang/Object;

    invoke-virtual {p1}, Lcom/instagram/android/directshare/e/a;->a()Lcom/instagram/android/model/b/e;

    move-result-object v3

    invoke-virtual {v3}, Lcom/instagram/android/model/b/e;->f()Ljava/lang/String;

    move-result-object v3

    aput-object v3, v2, v5

    invoke-virtual {p0, v1, v2}, Lcom/instagram/android/directshare/i/b;->a(I[Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Lcom/instagram/ui/a/a;->a(Ljava/lang/String;)Lcom/instagram/ui/a/a;

    move-result-object v0

    sget v1, Lcom/facebook/ba;->directshare_requested_direct_shares_confirm_ignore_msg:I

    new-array v2, v4, [Ljava/lang/Object;

    invoke-virtual {p1}, Lcom/instagram/android/directshare/e/a;->a()Lcom/instagram/android/model/b/e;

    move-result-object v3

    invoke-virtual {v3}, Lcom/instagram/android/model/b/e;->f()Ljava/lang/String;

    move-result-object v3

    aput-object v3, v2, v5

    invoke-virtual {p0, v1, v2}, Lcom/instagram/android/directshare/i/b;->a(I[Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Lcom/instagram/ui/a/a;->a(Ljava/lang/CharSequence;)Lcom/instagram/ui/a/a;

    move-result-object v0

    sget v1, Lcom/facebook/ba;->directshare_requested_direct_shares_confirm_ignore:I

    new-instance v2, Lcom/instagram/android/directshare/i/e;

    invoke-direct {v2, p0, p1}, Lcom/instagram/android/directshare/i/e;-><init>(Lcom/instagram/android/directshare/i/b;Lcom/instagram/android/directshare/e/a;)V

    invoke-virtual {v0, v1, v2}, Lcom/instagram/ui/a/a;->a(ILandroid/content/DialogInterface$OnClickListener;)Lcom/instagram/ui/a/a;

    move-result-object v0

    invoke-virtual {v0, v4}, Lcom/instagram/ui/a/a;->a(Z)Lcom/instagram/ui/a/a;

    move-result-object v0

    sget v1, Lcom/facebook/ba;->cancel:I

    const/4 v2, 0x0

    invoke-virtual {v0, v1, v2}, Lcom/instagram/ui/a/a;->b(ILandroid/content/DialogInterface$OnClickListener;)Lcom/instagram/ui/a/a;

    move-result-object v0

    invoke-virtual {v0}, Lcom/instagram/ui/a/a;->b()Landroid/app/Dialog;

    move-result-object v0

    invoke-virtual {v0}, Landroid/app/Dialog;->show()V

    .line 284
    return-void
.end method

.method static synthetic a(Lcom/instagram/android/directshare/i/b;)V
    .locals 0
    .parameter

    .prologue
    .line 42
    invoke-direct {p0}, Lcom/instagram/android/directshare/i/b;->Y()V

    return-void
.end method

.method static synthetic a(Lcom/instagram/android/directshare/i/b;Lcom/instagram/android/directshare/i/i;)V
    .locals 0
    .parameter
    .parameter

    .prologue
    .line 42
    invoke-direct {p0, p1}, Lcom/instagram/android/directshare/i/b;->a(Lcom/instagram/android/directshare/i/i;)V

    return-void
.end method

.method private a(Lcom/instagram/android/directshare/i/i;)V
    .locals 3
    .parameter

    .prologue
    .line 306
    new-instance v0, Lcom/instagram/ui/a/a;

    invoke-virtual {p0}, Lcom/instagram/android/directshare/i/b;->getContext()Landroid/content/Context;

    move-result-object v1

    invoke-direct {v0, v1}, Lcom/instagram/ui/a/a;-><init>(Landroid/content/Context;)V

    sget v1, Lcom/facebook/ba;->error:I

    invoke-virtual {v0, v1}, Lcom/instagram/ui/a/a;->b(I)Lcom/instagram/ui/a/a;

    move-result-object v0

    sget v1, Lcom/facebook/ba;->directshare_requested_direct_shares_request_failed:I

    invoke-virtual {v0, v1}, Lcom/instagram/ui/a/a;->a(I)Lcom/instagram/ui/a/a;

    move-result-object v0

    sget v1, Lcom/facebook/ba;->dismiss:I

    const/4 v2, 0x0

    invoke-virtual {v0, v1, v2}, Lcom/instagram/ui/a/a;->a(ILandroid/content/DialogInterface$OnClickListener;)Lcom/instagram/ui/a/a;

    move-result-object v0

    const/4 v1, 0x0

    invoke-virtual {v0, v1}, Lcom/instagram/ui/a/a;->a(Z)Lcom/instagram/ui/a/a;

    move-result-object v0

    invoke-virtual {v0}, Lcom/instagram/ui/a/a;->b()Landroid/app/Dialog;

    move-result-object v0

    invoke-virtual {v0}, Landroid/app/Dialog;->show()V

    .line 312
    return-void
.end method

.method private aa()V
    .locals 2

    .prologue
    .line 316
    iget-object v0, p0, Lcom/instagram/android/directshare/i/b;->b:Lcom/instagram/android/directshare/i/a;

    invoke-virtual {v0}, Lcom/instagram/android/directshare/i/a;->a()I

    move-result v0

    const/4 v1, 0x1

    if-gt v0, v1, :cond_0

    .line 317
    iget-object v0, p0, Lcom/instagram/android/directshare/i/b;->d:Landroid/widget/TextView;

    const/16 v1, 0x8

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setVisibility(I)V

    .line 327
    :goto_0
    return-void

    .line 319
    :cond_0
    iget-object v0, p0, Lcom/instagram/android/directshare/i/b;->d:Landroid/widget/TextView;

    const/4 v1, 0x0

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setVisibility(I)V

    .line 320
    iget-object v0, p0, Lcom/instagram/android/directshare/i/b;->d:Landroid/widget/TextView;

    new-instance v1, Lcom/instagram/android/directshare/i/g;

    invoke-direct {v1, p0}, Lcom/instagram/android/directshare/i/g;-><init>(Lcom/instagram/android/directshare/i/b;)V

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    goto :goto_0
.end method

.method static synthetic b(Lcom/instagram/android/directshare/i/b;)Lcom/instagram/android/directshare/i/a;
    .locals 1
    .parameter

    .prologue
    .line 42
    iget-object v0, p0, Lcom/instagram/android/directshare/i/b;->b:Lcom/instagram/android/directshare/i/a;

    return-object v0
.end method

.method static synthetic c(Lcom/instagram/android/directshare/i/b;)V
    .locals 0
    .parameter

    .prologue
    .line 42
    invoke-direct {p0}, Lcom/instagram/android/directshare/i/b;->aa()V

    return-void
.end method

.method static synthetic d(Lcom/instagram/android/directshare/i/b;)V
    .locals 0
    .parameter

    .prologue
    .line 42
    invoke-direct {p0}, Lcom/instagram/android/directshare/i/b;->X()V

    return-void
.end method

.method static synthetic e(Lcom/instagram/android/directshare/i/b;)V
    .locals 0
    .parameter

    .prologue
    .line 42
    invoke-direct {p0}, Lcom/instagram/android/directshare/i/b;->Z()V

    return-void
.end method


# virtual methods
.method public a(Landroid/view/LayoutInflater;Landroid/view/ViewGroup;Landroid/os/Bundle;)Landroid/view/View;
    .locals 2
    .parameter
    .parameter
    .parameter

    .prologue
    .line 78
    sget v0, Lcom/facebook/ax;->fragment_requested_direct_shares:I

    const/4 v1, 0x0

    invoke-virtual {p1, v0, p2, v1}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;Z)Landroid/view/View;

    move-result-object v0

    return-object v0
.end method

.method public a()Lcom/instagram/a/a;
    .locals 2

    .prologue
    .line 114
    new-instance v0, Lcom/instagram/android/directshare/i/j;

    const/4 v1, 0x0

    invoke-direct {v0, p0, v1}, Lcom/instagram/android/directshare/i/j;-><init>(Lcom/instagram/android/directshare/i/b;Lcom/instagram/android/directshare/i/c;)V

    return-object v0
.end method

.method public a(Landroid/os/Bundle;)V
    .locals 2
    .parameter

    .prologue
    .line 57
    invoke-super {p0, p1}, Lcom/instagram/e/b/b;->a(Landroid/os/Bundle;)V

    .line 58
    new-instance v0, Landroid/os/Handler;

    invoke-direct {v0}, Landroid/os/Handler;-><init>()V

    iput-object v0, p0, Lcom/instagram/android/directshare/i/b;->c:Landroid/os/Handler;

    .line 59
    new-instance v0, Lcom/instagram/android/directshare/i/a;

    invoke-virtual {p0}, Lcom/instagram/android/directshare/i/b;->getContext()Landroid/content/Context;

    move-result-object v1

    invoke-direct {v0, v1, p0}, Lcom/instagram/android/directshare/i/a;-><init>(Landroid/content/Context;Lcom/instagram/android/directshare/i/o;)V

    iput-object v0, p0, Lcom/instagram/android/directshare/i/b;->b:Lcom/instagram/android/directshare/i/a;

    .line 60
    const-string v0, "directshare_request"

    invoke-static {v0}, Lcom/instagram/android/c2dm/g;->b(Ljava/lang/String;)Landroid/content/IntentFilter;

    move-result-object v0

    iput-object v0, p0, Lcom/instagram/android/directshare/i/b;->e:Landroid/content/IntentFilter;

    .line 62
    new-instance v0, Lcom/instagram/android/directshare/i/c;

    invoke-direct {v0, p0}, Lcom/instagram/android/directshare/i/c;-><init>(Lcom/instagram/android/directshare/i/b;)V

    iput-object v0, p0, Lcom/instagram/android/directshare/i/b;->f:Landroid/content/BroadcastReceiver;

    .line 73
    return-void
.end method

.method public a(Landroid/view/View;Landroid/os/Bundle;)V
    .locals 3
    .parameter
    .parameter

    .prologue
    .line 83
    invoke-super {p0, p1, p2}, Lcom/instagram/e/b/b;->a(Landroid/view/View;Landroid/os/Bundle;)V

    .line 84
    sget v0, Lcom/facebook/aw;->requested_direct_shares_list:I

    invoke-virtual {p1, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/ListView;

    .line 85
    iget-object v1, p0, Lcom/instagram/android/directshare/i/b;->b:Lcom/instagram/android/directshare/i/a;

    invoke-virtual {v0, v1}, Landroid/widget/ListView;->setAdapter(Landroid/widget/ListAdapter;)V

    .line 87
    sget v1, Landroid/os/Build$VERSION;->SDK_INT:I

    const/16 v2, 0x13

    if-ge v1, v2, :cond_0

    .line 89
    new-instance v1, Landroid/view/View;

    invoke-virtual {p0}, Lcom/instagram/android/directshare/i/b;->getContext()Landroid/content/Context;

    move-result-object v2

    invoke-direct {v1, v2}, Landroid/view/View;-><init>(Landroid/content/Context;)V

    invoke-virtual {v0, v1}, Landroid/widget/ListView;->addFooterView(Landroid/view/View;)V

    .line 92
    :cond_0
    sget v0, Lcom/facebook/aw;->requested_direct_shares_ignore_all:I

    invoke-virtual {p1, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/TextView;

    iput-object v0, p0, Lcom/instagram/android/directshare/i/b;->d:Landroid/widget/TextView;

    .line 93
    return-void
.end method

.method public d_()Ljava/lang/String;
    .locals 1

    .prologue
    .line 331
    const-string v0, "direct_share_requests"

    return-object v0
.end method

.method public e(I)V
    .locals 1
    .parameter

    .prologue
    .line 119
    iget-object v0, p0, Lcom/instagram/android/directshare/i/b;->b:Lcom/instagram/android/directshare/i/a;

    invoke-virtual {v0, p1}, Lcom/instagram/android/directshare/i/a;->getItem(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/instagram/android/directshare/e/a;

    invoke-direct {p0, v0}, Lcom/instagram/android/directshare/i/b;->a(Lcom/instagram/android/directshare/e/a;)V

    .line 120
    return-void
.end method

.method public f(I)V
    .locals 6
    .parameter

    .prologue
    .line 124
    iget-object v0, p0, Lcom/instagram/android/directshare/i/b;->b:Lcom/instagram/android/directshare/i/a;

    invoke-virtual {v0, p1}, Lcom/instagram/android/directshare/i/a;->getItem(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/instagram/android/directshare/e/a;

    .line 125
    new-instance v1, Lcom/instagram/android/directshare/b/a/c;

    invoke-virtual {p0}, Lcom/instagram/android/directshare/i/b;->getContext()Landroid/content/Context;

    move-result-object v2

    invoke-virtual {p0}, Lcom/instagram/android/directshare/i/b;->u()Landroid/support/v4/app/aj;

    move-result-object v3

    new-instance v4, Lcom/instagram/android/directshare/i/h;

    sget-object v5, Lcom/instagram/android/directshare/i/i;->b:Lcom/instagram/android/directshare/i/i;

    invoke-direct {v4, p0, v0, v5}, Lcom/instagram/android/directshare/i/h;-><init>(Lcom/instagram/android/directshare/i/b;Lcom/instagram/android/directshare/e/a;Lcom/instagram/android/directshare/i/i;)V

    invoke-virtual {v0}, Lcom/instagram/android/directshare/e/a;->a()Lcom/instagram/android/model/b/e;

    move-result-object v5

    invoke-virtual {v5}, Lcom/instagram/android/model/b/e;->k()Ljava/lang/String;

    move-result-object v5

    invoke-direct {v1, v2, v3, v4, v5}, Lcom/instagram/android/directshare/b/a/c;-><init>(Landroid/content/Context;Landroid/support/v4/app/aj;Lcom/instagram/android/d/j/a;Ljava/lang/String;)V

    invoke-virtual {v1}, Lcom/instagram/android/directshare/b/a/c;->g()V

    .line 131
    const/4 v1, 0x1

    invoke-static {v0, v1}, Lcom/instagram/android/directshare/a/a;->a(Lcom/instagram/android/directshare/e/a;Z)V

    .line 132
    return-void
.end method

.method public w()V
    .locals 5

    .prologue
    .line 97
    invoke-super {p0}, Lcom/instagram/e/b/b;->w()V

    .line 98
    invoke-static {}, Lcom/instagram/android/directshare/d/w;->c()Z

    move-result v0

    if-eqz v0, :cond_0

    .line 99
    new-instance v0, Lcom/instagram/android/directshare/b/a/o;

    invoke-virtual {p0}, Lcom/instagram/android/directshare/i/b;->getContext()Landroid/content/Context;

    move-result-object v1

    invoke-virtual {p0}, Lcom/instagram/android/directshare/i/b;->u()Landroid/support/v4/app/aj;

    move-result-object v2

    new-instance v3, Lcom/instagram/android/directshare/i/k;

    const/4 v4, 0x0

    invoke-direct {v3, p0, v4}, Lcom/instagram/android/directshare/i/k;-><init>(Lcom/instagram/android/directshare/i/b;Lcom/instagram/android/directshare/i/c;)V

    invoke-direct {v0, v1, v2, v3}, Lcom/instagram/android/directshare/b/a/o;-><init>(Landroid/content/Context;Landroid/support/v4/app/aj;Lcom/instagram/android/d/j/a;)V

    invoke-virtual {v0}, Lcom/instagram/android/directshare/b/a/o;->g()V

    .line 108
    :goto_0
    invoke-static {}, Lcom/instagram/android/c2dm/k;->a()Lcom/instagram/android/c2dm/k;

    move-result-object v0

    invoke-virtual {v0}, Lcom/instagram/android/c2dm/k;->d()V

    .line 109
    iget-object v0, p0, Lcom/instagram/android/directshare/i/b;->f:Landroid/content/BroadcastReceiver;

    iget-object v1, p0, Lcom/instagram/android/directshare/i/b;->e:Landroid/content/IntentFilter;

    invoke-static {v0, v1}, Lcom/instagram/n/d;->a(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)V

    .line 110
    return-void

    .line 105
    :cond_0
    invoke-direct {p0}, Lcom/instagram/android/directshare/i/b;->Y()V

    goto :goto_0
.end method

.method public x()V
    .locals 2

    .prologue
    .line 152
    invoke-super {p0}, Lcom/instagram/e/b/b;->x()V

    .line 153
    iget-object v0, p0, Lcom/instagram/android/directshare/i/b;->c:Landroid/os/Handler;

    const/4 v1, 0x0

    invoke-virtual {v0, v1}, Landroid/os/Handler;->removeCallbacksAndMessages(Ljava/lang/Object;)V

    .line 154
    iget-object v0, p0, Lcom/instagram/android/directshare/i/b;->f:Landroid/content/BroadcastReceiver;

    invoke-static {v0}, Lcom/instagram/n/d;->a(Landroid/content/BroadcastReceiver;)V

    .line 155
    return-void
.end method
